package main

import (
	"flag"
	"gitee.com/gam6it/SecToolkit/qingteng/wanxiang"
	"log"
	"time"
)

/**
定期扫描资产，
*/

func main() {
	var url, username, password string
	flag.StringVar(&url, "url", "", "URL地址")
	flag.StringVar(&username, "u", "", "用户名")
	flag.StringVar(&password, "p", "", "密码")
	flag.Parse()
	if url == "" || username == "" || password == "" {
		log.Fatalf("输入不能为空！\n")
	}
	_, err := wanxiang.NewClient(url, username, password, 60*time.Second)
	if err != nil {
		log.Fatalf("创建客户端失败：%v\n", err)
	}
	log.Println("开始获取部分Host")

}
